<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>供给详情 - 社交平台</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    body {
      background-color: #f8f9fa;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      padding-bottom: 60px;
    }
    
    /* 顶部导航 */
    .top-nav {
      background-color: white;
      padding: 12px 15px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.05);
      position: sticky;
      top: 0;
      z-index: 100;
    }
    
    .nav-title {
      font-size: 18px;
      font-weight: 600;
      text-align: center;
      margin: 0;
    }
    
    /* 发布者信息 */
    .publisher-header {
      background-color: white;
      padding: 15px;
      display: flex;
      align-items: center;
      border-bottom: 1px solid #eee;
    }
    
    .publisher-avatar {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      object-fit: cover;
      margin-right: 12px;
    }
    
    .no-avatar {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background-color: #e9ecef;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #495057;
      font-size: 20px;
      margin-right: 12px;
    }
    
    .publisher-info {
      flex: 1;
    }
    
    .publisher-name {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      margin-bottom: 3px;
    }
    
    .publisher-meta {
      font-size: 13px;
      color: #666;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    
    .verify-badge {
      color: #0d6efd;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 3px;
    }
    
    /* 内容容器 */
    .supply-container {
      background-color: white;
      margin-top: 10px;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    /* 标题与价格 */
    .supply-header {
      padding: 15px;
      border-bottom: 1px solid #eee;
    }
    
    .supply-title {
      font-size: 18px;
      font-weight: 600;
      color: #333;
      margin-bottom: 10px;
      line-height: 1.4;
    }
    
    .supply-price {
      font-size: 20px;
      font-weight: 600;
      color: #dc3545;
      margin-bottom: 8px;
    }
    
    .price-unit {
      font-size: 14px;
      color: #666;
      font-weight: normal;
      margin-left: 5px;
    }
    
    /* 图片展示区 - 多种样式 */
    .images-container {
      position: relative;
    }
    
    .image-count {
      position: absolute;
      top: 10px;
      right: 10px;
      background-color: rgba(0,0,0,0.6);
      color: white;
      font-size: 12px;
      padding: 3px 8px;
      border-radius: 12px;
    }
    
    /* 单图样式 */
    .single-image {
      width: 100%;
    }
    
    .single-image img {
      width: 100%;
      height: auto;
      display: block;
    }
    
    /* 多图样式 */
    .multiple-images {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 2px;
    }
    
    .multi-image-item {
      aspect-ratio: 1;
      overflow: hidden;
    }
    
    .multi-image-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    
    .multi-image-item.col-2 {
      grid-column: span 2;
      aspect-ratio: 2;
    }
    
    /* 无图样式 */
    .no-images {
      padding: 40px 20px;
      text-align: center;
      background-color: #f9f9fa;
      color: #999;
    }
    
    .no-images i {
      font-size: 40px;
      margin-bottom: 10px;
    }
    
    /* 详情信息 */
    .supply-details {
      padding: 15px;
    }
    
    .detail-section {
      margin-bottom: 20px;
    }
    
    .section-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .section-title i {
      color: #0d6efd;
    }
    
    .detail-content {
      font-size: 15px;
      color: #555;
      line-height: 1.6;
    }
    
    .detail-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-bottom: 15px;
    }
    
    .meta-item {
      font-size: 14px;
      color: #666;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    
    .meta-item i {
      color: #999;
      font-size: 14px;
    }
    
    .tags-container {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
    }
    
    .supply-tag {
      padding: 4px 10px;
      background-color: #f0f7ff;
      color: #0d6efd;
      border-radius: 4px;
      font-size: 13px;
    }
    
    /* 操作按钮 */
    .action-buttons {
      display: flex;
      padding: 12px 15px;
      background-color: white;
      border-top: 1px solid #eee;
      position: sticky;
      bottom: 60px;
      z-index: 90;
    }
    
    .action-btn {
      flex: 1;
      padding: 10px 0;
      border-radius: 8px;
      font-size: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      margin: 0 5px;
    }
    
    /* 留言区 */
    .comments-section {
      background-color: white;
      margin-top: 10px;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      margin-bottom: 70px;
    }
    
    .comments-header {
      padding: 15px;
      border-bottom: 1px solid #eee;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .comments-title {
      font-size: 16px;
      font-weight: 600;
      color: #333;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .comments-title i {
      color: #0d6efd;
    }
    
    .comments-count {
      font-size: 13px;
      color: #666;
      margin-left: 5px;
    }
    
    /* 留言输入框 */
    .comment-input-container {
      padding: 12px 15px;
      border-bottom: 1px solid #eee;
    }
    
    .comment-input-wrapper {
      display: flex;
      gap: 10px;
    }
    
    .user-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }
    
    .comment-input-box {
      flex: 1;
      position: relative;
    }
    
    .comment-input {
      width: 100%;
      padding: 10px 15px;
      border-radius: 20px;
      border: 1px solid #ddd;
      font-size: 14px;
      resize: none;
      height: 40px;
      transition: height 0.3s ease;
    }
    
    .comment-input:focus {
      outline: none;
      border-color: #0d6efd;
      height: 80px;
    }
    
    .input-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 8px;
      gap: 10px;
    }
    
    .input-action-btn {
      font-size: 14px;
      padding: 5px 12px;
      border-radius: 16px;
    }
    
    /* 留言列表 */
    .comments-list {
      padding: 0 15px;
      max-height: 400px;
      overflow-y: auto;
    }
    
    .comment-item {
      padding: 15px 0;
      border-bottom: 1px solid #eee;
      display: flex;
      gap: 10px;
    }
    
    .comment-item:last-child {
      border-bottom: none;
    }
    
    .comment-content {
      flex: 1;
    }
    
    .comment-header {
      display: flex;
      justify-content: space-between;
      margin-bottom: 5px;
    }
    
    .comment-author {
      font-size: 14px;
      font-weight: 600;
      color: #333;
    }
    
    .comment-time {
      font-size: 12px;
      color: #999;
    }
    
    .comment-text {
      font-size: 14px;
      color: #555;
      margin-bottom: 8px;
      line-height: 1.5;
    }
    
    .comment-actions {
      display: flex;
      gap: 15px;
      font-size: 12px;
    }
    
    .comment-action {
      color: #666;
      display: flex;
      align-items: center;
      gap: 3px;
      cursor: pointer;
    }
    
    .comment-action:hover {
      color: #0d6efd;
    }
    
    /* 回复区域 */
    .replies-container {
      margin-top: 10px;
      padding-left: 15px;
      border-left: 2px solid #eee;
    }
    
    .reply-item {
      padding: 8px 0;
      display: flex;
      gap: 8px;
    }
    
    .reply-content {
      flex: 1;
      background-color: #f9fafb;
      padding: 8px 12px;
      border-radius: 12px;
      font-size: 13px;
    }
    
    .reply-author {
      font-weight: 600;
      color: #333;
      margin-right: 5px;
    }
    
    .reply-text {
      color: #555;
    }
    
    .reply-actions {
      display: flex;
      gap: 10px;
      margin-top: 5px;
      font-size: 11px;
      color: #666;
    }
    
    .reply-action {
      cursor: pointer;
    }
    
    .reply-action:hover {
      color: #0d6efd;
    }
    
    /* 底部导航 */
    .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background-color: white;
      border-top: 1px solid #eee;
      display: flex;
      padding: 8px 0;
      z-index: 100;
    }
    
    .nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      color: #999;
      font-size: 10px;
    }
    
    .nav-item.active {
      color: #0d6efd;
    }
    
    .nav-icon {
      font-size: 20px;
      margin-bottom: 3px;
    }
  </style>
</head>
<body>
  <!-- 顶部导航 -->
  <div class="top-nav d-flex justify-content-between align-items-center">
    <button class="btn btn-link p-0 text-dark" id="back-btn">
      <i class="fa fa-arrow-left"></i>
    </button>
    <h1 class="nav-title">供给详情</h1>
    <button class="btn btn-link p-0 text-dark">
      <i class="fa fa-share-alt"></i>
    </button>
  </div>
  
  <!-- 发布者信息 -->
  <div class="publisher-header">
    <img src="https://picsum.photos/100/100?random=10" class="publisher-avatar" alt="发布者头像">
    <div class="publisher-info">
      <div class="publisher-name">科技数码批发</div>
      <div class="publisher-meta">
        <span><i class="fa fa-clock-o"></i> 2小时前</span>
        <span class="verify-badge"><i class="fa fa-check-circle"></i> 已认证</span>
      </div>
    </div>
    <button class="btn btn-outline-primary btn-sm" id="follow-btn">关注</button>
  </div>
  
  <!-- 供给内容容器 -->
  <div class="supply-container">
    <!-- 标题与价格 -->
    <div class="supply-header">
      <div class="supply-title">全新智能手机批发，型号齐全，支持混批</div>
      <div class="supply-price">
        1500元 <span class="price-unit">起/部</span>
      </div>
      <div class="detail-meta">
        <div class="meta-item"><i class="fa fa-map-marker"></i> 深圳市</div>
        <div class="meta-item"><i class="fa fa-archive"></i> 库存120部</div>
        <div class="meta-item"><i class="fa fa-eye"></i> 562浏览</div>
      </div>
    </div>
    
    <!-- 图片展示区 - 多图样式 -->
    <div class="images-container">
      <div class="image-count">5图</div>
      <div class="multiple-images">
        <div class="multi-image-item col-2">
          <img src="https://picsum.photos/800/400?random=20" alt="产品图片">
        </div>
        <div class="multi-image-item">
          <img src="https://picsum.photos/400/400?random=21" alt="产品图片">
        </div>
        <div class="multi-image-item">
          <img src="https://picsum.photos/400/400?random=22" alt="产品图片">
        </div>
        <div class="multi-image-item">
          <img src="https://picsum.photos/400/400?random=23" alt="产品图片">
        </div>
        <div class="multi-image-item">
          <img src="https://picsum.photos/400/400?random=24" alt="产品图片">
        </div>
      </div>
    </div>
    
    <!-- 详情信息 -->
    <div class="supply-details">
      <div class="detail-section">
        <h3 class="section-title"><i class="fa fa-info-circle"></i> 产品介绍</h3>
        <div class="detail-content">
          最新款智能手机批发，品牌包括苹果、华为、小米等，型号齐全，保证正品，支持验机。起批量低，10部即可起批，适合实体店和电商卖家进货，价格有优势。
        </div>
        <div class="detail-content">
          所有手机均为全新未拆封，原装正品，支持全国联保。量大可议价，支持一件代发服务，提供完整数据包，欢迎咨询合作。
        </div>
      </div>
      
      <div class="detail-section">
        <h3 class="section-title"><i class="fa fa-truck"></i> 交易说明</h3>
        <div class="detail-content">
          1. 支持支付宝、微信支付、银行转账等多种付款方式<br>
          2. 默认发顺丰快递，批量订单可发物流<br>
          3. 下单后48小时内发货，支持七天无理由退换<br>
          4. 批量采购满100部可提供定制包装服务
        </div>
      </div>
      
      <div class="detail-section">
        <h3 class="section-title"><i class="fa fa-tags"></i> 相关标签</h3>
        <div class="tags-container">
          <span class="supply-tag">电子产品</span>
          <span class="supply-tag">手机</span>
          <span class="supply-tag">批发</span>
          <span class="supply-tag">正品</span>
          <span class="supply-tag">可代发</span>
        </div>
      </div>
    </div>
  </div>
  
  <!-- 操作按钮 -->
  <div class="action-buttons">
    <button class="btn btn-outline-primary action-btn" id="collect-btn">
      <i class="fa fa-heart-o"></i> 收藏
    </button>
    <button class="btn btn-outline-secondary action-btn">
      <i class="fa fa-phone"></i> 电话联系
    </button>
    <button class="btn btn-primary action-btn">
      <i class="fa fa-comment"></i> 在线咨询
    </button>
  </div>
  
  <!-- 留言区 -->
  <div class="comments-section">
    <div class="comments-header">
      <h3 class="comments-title">
        <i class="fa fa-comments"></i> 留言咨询
        <span class="comments-count">(18)</span>
      </h3>
      <button class="btn btn-link p-0 text-dark">
        <i class="fa fa-sort"></i>
      </button>
    </div>
    
    <!-- 留言输入框 -->
    <div class="comment-input-container">
      <div class="comment-input-wrapper">
        <div class="no-avatar">
          <i class="fa fa-user"></i>
        </div>
        <div class="comment-input-box">
          <textarea class="comment-input" placeholder="有什么想问的？"></textarea>
          <div class="input-actions">
            <button class="btn btn-outline-secondary input-action-btn">取消</button>
            <button class="btn btn-primary input-action-btn">发送</button>
          </div>
        </div>
      </div>
    </div>
    
    <!-- 留言列表 -->
    <div class="comments-list">
      <!-- 留言1 -->
      <div class="comment-item">
        <img src="https://picsum.photos/100/100?random=30" class="user-avatar" alt="用户头像">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">张先生</div>
            <div class="comment-time">今天 09:45</div>
          </div>
          <div class="comment-text">
            华为Mate 60有货吗？批量采购50部什么价格？
          </div>
          <div class="comment-actions">
            <div class="comment-action"><i class="fa fa-thumbs-o-up"></i> 3</div>
            <div class="comment-action"><i class="fa fa-reply"></i> 回复</div>
          </div>
          
          <!-- 回复区 -->
          <div class="replies-container">
            <div class="reply-item">
              <img src="https://picsum.photos/100/100?random=10" class="user-avatar" alt="发布者头像">
              <div class="reply-content">
                <span class="reply-author">科技数码批发</span>
                <span class="reply-text">有货的，50部的话可以给到1450元/部，包含运费</span>
                <div class="reply-actions">
                  <div class="reply-action">赞 (1)</div>
                  <div class="reply-action">回复</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 留言2 -->
      <div class="comment-item">
        <div class="no-avatar">
          <i class="fa fa-user"></i>
        </div>
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">李小姐</div>
            <div class="comment-time">昨天 15:30</div>
          </div>
          <div class="comment-text">
            支持一件代发吗？需要收取手续费吗？
          </div>
          <div class="comment-actions">
            <div class="comment-action"><i class="fa fa-thumbs-o-up"></i> 5</div>
            <div class="comment-action"><i class="fa fa-reply"></i> 回复</div>
          </div>
          
          <!-- 回复区 -->
          <div class="replies-container">
            <div class="reply-item">
              <img src="https://picsum.photos/100/100?random=10" class="user-avatar" alt="发布者头像">
              <div class="reply-content">
                <span class="reply-author">科技数码批发</span>
                <span class="reply-text">支持一件代发，不收取额外手续费，价格按批发价+运费即可</span>
                <div class="reply-actions">
                  <div class="reply-action">赞 (0)</div>
                  <div class="reply-action">回复</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      
      <!-- 留言3 -->
      <div class="comment-item">
        <img src="https://picsum.photos/100/100?random=31" class="user-avatar" alt="用户头像">
        <div class="comment-content">
          <div class="comment-header">
            <div class="comment-author">王老板</div>
            <div class="comment-time">3天前</div>
          </div>
          <div class="comment-text">
            上周在你这拿的货已经收到了，质量不错，下次再合作！
          </div>
          <div class="comment-actions">
            <div class="comment-action"><i class="fa fa-thumbs-o-up"></i> 8</div>
            <div class="comment-action"><i class="fa fa-reply"></i> 回复</div>
          </div>
          
          <!-- 回复区 -->
          <div class="replies-container">
            <div class="reply-item">
              <img src="https://picsum.photos/100/100?random=10" class="user-avatar" alt="发布者头像">
              <div class="reply-content">
                <span class="reply-author">科技数码批发</span>
                <span class="reply-text">感谢支持，下次进货给您申请额外优惠！</span>
                <div class="reply-actions">
                  <div class="reply-action">赞 (2)</div>
                  <div class="reply-action">回复</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  
  <!-- 底部导航 -->
  <div class="bottom-nav">
    <a href="#" class="nav-item">
      <i class="fa fa-home nav-icon"></i>
      <span>首页</span>
    </a>
    <a href="#" class="nav-item active">
      <i class="fa fa-shopping-bag nav-icon"></i>
      <span>供给</span>
    </a>
    <a href="#" class="nav-item">
      <i class="fa fa-exchange nav-icon"></i>
      <span>交易</span>
    </a>
    <a href="#" class="nav-item">
      <i class="fa fa-user nav-icon"></i>
      <span>我的</span>
    </a>
  </div>

  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 返回按钮功能
    document.getElementById('back-btn').addEventListener('click', function() {
      // 实际应用中会返回上一页
      alert('返回列表页');
    });
    
    // 关注按钮切换
    document.getElementById('follow-btn').addEventListener('click', function() {
      if (this.textContent === '关注') {
        this.textContent = '已关注';
        this.classList.remove('btn-outline-primary');
        this.classList.add('btn-secondary');
      } else {
        this.textContent = '关注';
        this.classList.remove('btn-secondary');
        this.classList.add('btn-outline-primary');
      }
    });
    
    // 收藏按钮功能
    document.getElementById('collect-btn').addEventListener('click', function() {
      const icon = this.querySelector('i');
      
      if (icon.classList.contains('fa-heart-o')) {
        icon.classList.remove('fa-heart-o');
        icon.classList.add('fa-heart', 'text-danger');
        this.textContent = ' 已收藏';
        this.prepend(icon);
      } else {
        icon.classList.remove('fa-heart', 'text-danger');
        icon.classList.add('fa-heart-o');
        this.textContent = ' 收藏';
        this.prepend(icon);
      }
    });
    
    // 留言点赞功能
    document.querySelectorAll('.comment-action .fa-thumbs-o-up').forEach(thumb => {
      thumb.addEventListener('click', function(e) {
        e.stopPropagation();
        const actionEl = this.parentElement;
        let count = parseInt(actionEl.textContent.trim().split(' ').pop());
        
        if (this.classList.contains('text-primary')) {
          this.classList.remove('text-primary');
          actionEl.innerHTML = `<i class="fa fa-thumbs-o-up"></i> ${count - 1}`;
        } else {
          this.classList.add('text-primary');
          actionEl.innerHTML = `<i class="fa fa-thumbs-o-up text-primary"></i> ${count + 1}`;
        }
      });
    });
    
    // 回复点赞功能
    document.querySelectorAll('.reply-action').forEach(action => {
      if (action.textContent.includes('赞')) {
        action.addEventListener('click', function(e) {
          e.stopPropagation();
          let count = parseInt(this.textContent.trim().split(' ')[1].replace('(', '').replace(')', ''));
          
          if (this.classList.contains('text-primary')) {
            this.classList.remove('text-primary');
            this.textContent = `赞 (${count - 1})`;
          } else {
            this.classList.add('text-primary');
            this.textContent = `赞 (${count + 1})`;
          }
        });
      }
    });
    
    // 回复功能
    document.querySelectorAll('.comment-action .fa-reply').forEach(replyIcon => {
      replyIcon.addEventListener('click', function(e) {
        e.stopPropagation();
        const commentItem = this.closest('.comment-item');
        const authorName = commentItem.querySelector('.comment-author').textContent;
        
        // 聚焦到输入框并填充回复前缀
        const commentInput = document.querySelector('.comment-input');
        commentInput.value = `回复 @${authorName}：`;
        commentInput.focus();
        commentInput.style.height = '80px';
        
        // 滚动到输入框
        commentInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
      });
    });
    
    // 回复区内的回复功能
    document.querySelectorAll('.reply-action').forEach(action => {
      if (action.textContent.includes('回复')) {
        action.addEventListener('click', function(e) {
          e.stopPropagation();
          const replyItem = this.closest('.reply-item');
          const authorName = replyItem.querySelector('.reply-author').textContent;
          
          // 聚焦到输入框并填充回复前缀
          const commentInput = document.querySelector('.comment-input');
          commentInput.value = `回复 @${authorName}：`;
          commentInput.focus();
          commentInput.style.height = '80px';
          
          // 滚动到输入框
          commentInput.scrollIntoView({ behavior: 'smooth', block: 'center' });
        });
      }
    });
  </script>
</body>
</html>
